# -*- coding: utf-8 -*-
# created by Src - 一路好时光

import datetime

d=datetime.datetime.now()
print(d.today())#2024-07-14 10:35:56.588987
#time.struct_time(tm_year=2024, tm_mon=7, tm_mday=14, tm_hour=10, tm_min=36, tm_sec=31, tm_wday=6, tm_yday=196, tm_isdst=-1)
print(d.timetuple())

#打印时间戳类型
#1976-09-12 10:13:43
print(datetime.datetime.fromtimestamp(211342423))

#当前时间加5天
#2024-07-19 10:41:22.648823
print(d+datetime.timedelta(days=5))

#时间替换 2100-08-14 10:43:14.475421
print(d.replace(year=2100,month=8))

